package com.xx.sg.excel.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.xx.sg.excel.DutyExcel;

import java.util.ArrayList;
import java.util.List;

public class DutyExcelListener extends AnalysisEventListener<DutyExcel> {

    private final List<DutyExcel> list = new ArrayList<DutyExcel>();

    @Override
    public void invoke(DutyExcel dutyExcel, AnalysisContext analysisContext) {
        list.add(dutyExcel);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }

    public List<DutyExcel> getData() {
        return list;
    }
}
